package com.kakarote.ids.provider.entity.VO;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

@ApiModel("获取tokenBO")
public class TokenVO implements Serializable {
    @ApiModelProperty("token")
    private String accessToken;

    @ApiModelProperty("过期时间")
    private Integer expiresIn;

    @ApiModelProperty("refreshToken")
    private String refreshToken;

    @ApiModelProperty("token类型")
    private String tokenType;

    @ApiModelProperty("作用域")
    private String scope;

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public void setExpiresIn(Integer expiresIn) {
        this.expiresIn = expiresIn;
    }

    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }

    public void setTokenType(String tokenType) {
        this.tokenType = tokenType;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public String toString() {
        return "TokenVO(accessToken=" + getAccessToken() + ", expiresIn=" + getExpiresIn() + ", refreshToken=" + getRefreshToken() + ", tokenType=" + getTokenType() + ", scope=" + getScope() + ")";
    }

    public String getAccessToken() {
        return this.accessToken;
    }

    public Integer getExpiresIn() {
        return this.expiresIn;
    }

    public String getRefreshToken() {
        return this.refreshToken;
    }

    public String getTokenType() {
        return this.tokenType;
    }

    public String getScope() {
        return this.scope;
    }

    public TokenVO() {
    }

    public TokenVO(String accessToken) {
        this.accessToken = accessToken;
        setExpiresIn(Integer.valueOf(7200));
        setScope("base");
        setTokenType("Bearer");
    }
}
